package com.ate.javamvp.api;
import com.ate.bean.GoodsBean;
import com.ate.bean.SearchBean;
import com.ate.bean.TuijianBean;
import com.ate.lib_core.http.ObjDataBean;
import com.google.gson.JsonObject;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * @author Ate
 * @description:
 * @date :2020/12/10 16:14
 */
public interface Api {
    @POST("api/User/register")
    Observable<ObjDataBean<String>> register(@Body RequestBody requestBody);

    @POST("api/User/login")
    Observable<JsonObject> login(@Body RequestBody requestBody);

    @GET("api/Goods/getRecommendGoods?page=1&pagesize=100")
    Observable<GoodsBean> getGoods();

    @GET("api/GoodsType/getRecommendTypes")
    Observable<TuijianBean> getTuijian();

    @GET("api/Goods/getGoods")
    Observable<SearchBean> getSearchGoods(@Query("keyword")String keyword
                                            ,@Query("type")String type,@Query("pageno")String pageno
                                                ,@Query("pagesize")String pagesize);

}
